<%--
  Created by IntelliJ IDEA.
  User: 15283
  Date: 2025/11/21
  Time: 11:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>书本页面</title>
</head>
<body>
<form action="selectiveBook" method="post">
    书名:<input type="text" name="bookName">
    作者:<input type="text" name="bookWriter">
    类型:<input type="text" name="bookType">
    价格:<input type="text" name="bookPrice">
    <input type="submit" value="查询">
</form>
<table width="700" border="1">
    <tr>
        <th>书ID</th>
        <th>书名</th>
        <th>作者</th>
        <th>类型</th>
        <th>价格</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${pageInfo.list}" var="book">
        <tr>
            <td>${book.bookId}</td>
            <td>${book.bookName}</td>
            <td>${book.bookWriter}</td>
            <td>${book.bookType}</td>
            <td>${book.bookPrice}</td>
            <td>
                <a href="bookOperate?bookId=${book.bookId}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
<div id="pageBox">
    <a href="selectAllBook?pageNum=1&pageSize=${pageInfo.getPageSize()}">首页</a>
    <c:if test="${pageInfo.isHasPreviousPage()}">
        <a href="selectAllBook?pageNum=${pageInfo.getPrePage()}&pageSize=${pageInfo.getPageSize()}">上一页</a>
    </c:if>
    <c:forEach items="${pageInfo.getNavigatepageNums()}" var="num">
        <a href="selectAllBook?pageNum=${num}&pageSize=${pageInfo.getPageSize()}">${num}</a>
    </c:forEach>
    <c:if test="${pageInfo.isHasNextPage()}">
        <a href="selectAllBook?pageNum=${pageInfo.getNextPage()}&pageSize=${pageInfo.getPageSize()}">下一页</a>
    </c:if>
    <a href="selectAllBook?pageNum=${pageInfo.getPages()}&pageSize=${pageInfo.getPageSize()}">末页</a>
</div>
</body>
</html>
